﻿using LuShanTea.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LuShanTea.IService
{
    public interface IPermissionService : IServiceSupport
    {
        long AddNew(string name, string describle);

        void Update(long permissionId, string naem, string describle);

        void MarkDeleted(long permissionId);

        PermissionDTO[] GetByAdminUserId(long adminUserId);

        void AddPermissionByRole(long roleId, long[] permissionIds);

        PermissionDTO[] GetAll();

        PermissionDTO GetById(long permission);

        //根据权限名过去权限 如：（"User.Add"）用于判断权限是否已存在，防止重复添加
        PermissionDTO GetByName(string permissionName);

        PermissionDTO[] GetByRoleId(long roleId);

        void UpdatePermissionByRoleId(long roleId, long[] permissionIds);

    }
}
